<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:composite="http://java.sun.com/jsf/composite">
      
<h:body>

	<composite:interface>
		<composite:attribute name="vendedor" type="mm.back.entity.Vendedor" required="true" ></composite:attribute>
		<composite:attribute name="reRender" type="java.lang.String"></composite:attribute>
		<composite:attribute name="requerided" type="java.lang.Boolean" />
	</composite:interface>
	
	<composite:implementation>
        	<h:selectOneMenu value="#{cc.attrs.vendedor}" converter="vendedorConverter" required="#{cc.attrs.requerided}" requiredMessage="Debe seleccionar un vendedor" >
        		<f:selectItem  itemValue="#{null}" itemLabel="Seleccione un vendedor"  />
        		<f:selectItems value="#{vendedorBean.vendedores}" var="vend" itemLabel="#{vend.nombreCompleto}" itemValue="#{vend}" />
        		<a4j:ajax event="change" render="#{cc.attrs.reRender}"></a4j:ajax>
        	</h:selectOneMenu>
	</composite:implementation>
	
</h:body>      
</html>